﻿@using DNT.RavenQA.Core.Extensions
<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8" />
    <meta name="viewport" content="width=device-width" />
    <title>@ViewBag.Title</title>
    @Styles.Render("~/content/css")
    @Scripts.Render("~/bundles/modernizr")
    @Scripts.Render("~/bundles/jquery")
</head>
    <body>
        <div id="container">
            <header id="header">
                <div id="topbar">
                @if (User.IsNotNull() && User.Identity.IsAuthenticated)
                {
                    @Html.ActionLink(String.Format("Log Out ({0})", @User.Identity.Name), "LogOut", "User")
                }
                else
                {
                    @Html.ActionLink("Log In", "LogIn", "User")
                }
                </div>
                <br class="cbt" />
                <div id="hlogo">
                    @Html.ActionLink("DNT Q&A", "Index", "Question")
                </div>
                <nav class="nav">
                    <ul>
                        <li class="@(Html.MatchRouteData("Question", "ByTag", "Hottest", "Index", "Details") ? "selected" : "")">
                            @Html.ActionLink("Questions", 
                                             "Index", 
                                             "Question", null, new { @class = "nav-questions" })</li>
                        <li class="@(Html.MatchRouteData("Question", "Add") ? "selected" : "")">
                            @Html.ActionLink("Post a question!", 
                                             "Add", 
                                             "Question", 
                                             null, 
                                             new { @class = "nav-askquestion" })</li>
                    </ul>
                </nav>
                <div class="cbt"></div>
            </header>
            <div id="content">
                @RenderBody()
                @RenderSection("sidebar", required: false)
                <div class="cbt"></div>
            </div>
            <div id="footer">
                <div class="footerwrap">
                    <div id="footer-flair">
                        <div id="svnrev">rev 2012.11.16.374</div>
                    </div>
                    <div id="copyright">
                        site design / logo &copy; @DateTime.Now.Year - <a href="http://www.dotnettoscana.org">DotNetToscana</a>
                    </div>
                </div>
            </div>
        </div>
        @Scripts.Render("~/bundles/jquery")
        @RenderSection("scripts", required: false)
    </body>
</html>